KaVe Grup Çalışması Raporu

Proje Amaçları

  • R ile tüberküloz verisinin hazırlanması ve dünya üzerindeki yoğunluk haritasının ortaya konulması.

Kazanımlar

  • Tüberküloz verisinin detaylı analizi ve Tüberküloz hakkında farkındalık kazandırılması
  • İnteraktif görselleştirme yetkinliği

Kullanılan Kütüphaneler

  • Plotly

Grup Üyeleri

  • Emircan Sarıtaş
  • Kübra Kurt
  • Zehra Karadağ
  • Feyza Zeynep Salam
  • Yunus Emre Gündoğmuş

Veri ve Kütüphanelerin Okunması

In [1]:
library(plotly)
data <- read.csv("TB_burden_countries_2019-12-23.csv")
data2018<-data[which(data$year==2018), ]
Loading required package: ggplot2
Registered S3 methods overwritten by 'ggplot2':
  method         from 
  [.quosures     rlang
  c.quosures     rlang
  print.quosures rlang

Attaching package: 'plotly'

The following object is masked from 'package:ggplot2':

    last_plot

The following object is masked from 'package:stats':

    filter

The following object is masked from 'package:graphics':

    layout

In [2]:
head(data2018)
countryiso2iso3iso_numericg_whoregionyeare_pop_nume_inc_100ke_inc_100k_loe_inc_100k_hi...cfrcfr_locfr_hicfr_pctcfr_pct_locfr_pct_hic_newinc_100kc_cdrc_cdr_loc_cdr_hi
19Afghanistan AF AFG 4 EMR 2018 37171921 189 122.0 270.0 ... 0.16 0.08 0.26 16 8 26 130.0 69 48 110
38Albania AL ALB 8 EUR 2018 2882740 18 15.0 20.0 ... 0.02 0.01 0.03 2 1 3 15.0 87 75 100
57Algeria DZ DZA 12 AFR 2018 42228408 69 53.0 88.0 ... 0.11 0.07 0.17 11 7 17 56.0 80 63 100
76American SamoaAS ASM 16 WPR 2018 55465 0 0.0 0.0 ... NA NA NA NA NA NA 0.0 NA NA NA
95Andorra AD AND 20 EUR 2018 77006 3 2.6 3.5 ... 0.08 0.05 0.12 8 5 12 2.6 87 75 100
114Angola AO AGO 24 AFR 2018 30809787 355 230.0 507.0 ... 0.21 0.11 0.33 21 11 33 215.0 61 42 94

Popülasyon

In [27]:
# light grey boundaries
l <- list(color = toRGB("grey"), width = 0.5)

# specify map projection/options
g <- list(
  showframe = FALSE,
  showcoastlines = FALSE,
  projection = list(type = 'Mercator')
)

p <- plot_geo(data2018) %>%
  add_trace(
    z = ~e_pop_num, color = ~e_pop_num, colorscale = 'Viridis',
    text = ~country, locations = ~iso3, marker = list(line = l)
  ) %>%
  colorbar(title = 'Population', tickprefix = '') %>%
  layout(
    title = '2019 Tuberculosis (TB)<br>Source:<a href="https://www.who.int/tb/country/data/download/en/">World Health Organization</a>',
    geo = g
  )

p

100K Kişide Ölüm Yüzdesi

In [28]:
# light grey boundaries
l <- list(color = toRGB("grey"), width = 0.5)

# specify map projection/options
g <- list(
  showframe = FALSE,
  showcoastlines = FALSE,
  projection = list(type = 'Mercator')
)

p <- plot_geo(data2018) %>%
  add_trace(
    z = ~e_mort_exc_tbhiv_100k_lo, color = ~e_mort_exc_tbhiv_100k_lo, colorscale = 'RdBu',
    text = ~country, locations = ~iso3, marker = list(line = l)
  ) %>%
  colorbar(title = 'Case Count', tickprefix = '') %>%
  layout(
    title = '2019 Tuberculosis (TB)<br>Source:<a href="https://www.who.int/tb/country/data/download/en/">World Health Organization</a>',
    geo = g
  )

p

Verem Ölüm Sayısı

In [30]:
# light grey boundaries
l <- list(color = toRGB("grey"), width = 0.5)

# specify map projection/options
g <- list(
  showframe = FALSE,
  showcoastlines = FALSE,
  projection = list(type = 'Mercator')
)

p <- plot_geo(data2018) %>%
  add_trace(
    z = ~e_mort_exc_tbhiv_num, color = ~e_mort_exc_tbhiv_num, colorscale = 'Magma_r',
    text = ~country, locations = ~iso3, marker = list(line = l)
  ) %>%
  colorbar(title = 'Case Count', tickprefix = '') %>%
  layout(
    title = '2019 Tuberculosis (TB)<br>Source:<a href="https://www.who.int/tb/country/data/download/en/">World Health Organization</a>',
    geo = g
  )

p

Tahmini Tüberküloz Vakası Ölüm Oranı (ÜST_SINIR)

In [33]:
# light grey boundaries
l <- list(color = toRGB("grey"), width = 0.5)

# specify map projection/options
g <- list(
  showframe = FALSE,
  showcoastlines = FALSE,
  projection = list(type = 'Mercator')
)

p <- plot_geo(data2018) %>%
  add_trace(
    z = ~cfr_hi, color = ~cfr_hi, colorscale = 'YlOrRd',
    text = ~country, locations = ~iso3, marker = list(line = l)
  ) %>%
  colorbar(title = 'Casea Count', tickprefix = '') %>%
  layout(
    title = '2019 Tuberculosis (TB)<br>Source:<a href="https://www.who.int/tb/country/data/download/en/">World Health Organization</a>',
    geo = g
  )

p
Warning message:
"Ignoring 8 observations"

Tahmini Tüberküloz Vakası Ölüm Oranı (ALT_SINIR)

In [37]:
# light grey boundaries
l <- list(color = toRGB("grey"), width = 0.5)

# specify map projection/options
g <- list(
  showframe = FALSE,
  showcoastlines = FALSE,
  projection = list(type = 'Mercator')
)

p <- plot_geo(data2018) %>%
  add_trace(
    z = ~cfr_lo, color = ~cfr_lo, colorscale = 'Greens',
    text = ~country, locations = ~iso3, marker = list(line = l)
  ) %>%
  colorbar(title = 'Casea Count', tickprefix = '') %>%
  layout(
    title = '2019 Tuberculosis (TB)<br>Source:<a href="https://www.who.int/tb/country/data/download/en/">World Health Organization</a>',
    geo = g
  )

p
Warning message:
"Ignoring 8 observations"